import http from '@/util/http.js'

/**
 * 分页查询权限
 * @param params
 */
export function getAutPage(params) {
  return http({
    url: '/kadmin/aut/get_page',
    method: 'post',
    data: params
  })
}

/**
 * 删除权限
 * @param params
 */
export function deleteAut(params) {
  return http({
    url: '/kadmin/aut/delete',
    method: 'post',
    data: params
  })
}

/**
 * 新增权限
 * @param params
 */
export function add(params) {
  return http({
    url: '/kadmin/aut/add',
    method: 'post',
    data: params
  })
}

/**
 * 修改权限
 * @param params
 */
export function modify(params) {
  return http({
    url: '/kadmin/aut/modify',
    method: 'post',
    data: params
  })
}

/**
 * 角色授权
 * @param params
 */
export function autRole(params) {
  return http({
    url: '/kadmin/aut/aut_role',
    method: 'post',
    data: params
  })
}

/**
 * 查询所有权限
 * @param params
 */
export function getAllAuth(params) {
  return http({
    url: '/kadmin/aut/get_all_auth',
    method: 'post',
    data: params
  })
}

/**
 * 查询角色已授权权限
 * @param params
 */
export function getRoleAut(params) {
  return http({
    url: '/kadmin/aut/get_role_aut',
    method: 'post',
    data: params
  })
}

/**
 * 绑定菜单权限
 * @param params
 */
export function bindMenuAut(params) {
  return http({
    url: '/kadmin/aut/bind_menu_aut',
    method: 'post',
    data: params
  })
}
